home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Graphics Programming (2nd Edition) / Visual Basic Graphics Programming 2nd Edition.iso / Src / Ch1 / TestSwin.frm < prev    next >
Text File  |  1999-04-17  |  4KB  |  127 lines

  1. VERSION 5.00
  2. Object = "*\ASwin.vbp"
  3. Begin VB.Form frmTestSwin 
  4.    Caption         =   "TestSwin"
  5.    ClientHeight    =   4050
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   5580
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   4050
  11.    ScaleWidth      =   5580
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin Project2.ScrolledWindow swinMarble 
  14.       Height          =   2175
  15.       Index           =   0
  16.       Left            =   120
  17.       TabIndex        =   0
  18.       Top             =   120
  19.       Width           =   2415
  20.       _ExtentX        =   4260
  21.       _ExtentY        =   3836
  22.       Begin VB.PictureBox picMarble 
  23.          AutoSize        =   -1  'True
  24.          Height          =   6105
  25.          Index           =   0
  26.          Left            =   240
  27.          Picture         =   "TestSwin.frx":0000
  28.          ScaleHeight     =   6045
  29.          ScaleWidth      =   6225
  30.          TabIndex        =   1
  31.          Top             =   240
  32.          Width           =   6285
  33.       End
  34.    End
  35.    Begin Project2.ScrolledWindow swinMarble 
  36.       Height          =   2175
  37.       Index           =   1
  38.       Left            =   2640
  39.       TabIndex        =   2
  40.       Top             =   120
  41.       Width           =   2415
  42.       _ExtentX        =   4260
  43.       _ExtentY        =   3836
  44.       Begin VB.PictureBox picMarble 
  45.          AutoSize        =   -1  'True
  46.          Height          =   6105
  47.          Index           =   1
  48.          Left            =   240
  49.          Picture         =   "TestSwin.frx":7ACE2
  50.          ScaleHeight     =   6045
  51.          ScaleWidth      =   6225
  52.          TabIndex        =   3
  53.          Top             =   240
  54.          Width           =   6285
  55.       End
  56.    End
  57.    Begin Project2.ScrolledWindow swinMarble 
  58.       Height          =   2175
  59.       Index           =   2
  60.       Left            =   120
  61.       TabIndex        =   4
  62.       Top             =   2400
  63.       Width           =   2415
  64.       _ExtentX        =   4260
  65.       _ExtentY        =   3836
  66.       Begin VB.PictureBox picMarble 
  67.          AutoSize        =   -1  'True
  68.          Height          =   6105
  69.          Index           =   2
  70.          Left            =   240
  71.          Picture         =   "TestSwin.frx":F59C4
  72.          ScaleHeight     =   6045
  73.          ScaleWidth      =   6225
  74.          TabIndex        =   5
  75.          Top             =   240
  76.          Width           =   6285
  77.       End
  78.    End
  79.    Begin Project2.ScrolledWindow swinMarble 
  80.       Height          =   2175
  81.       Index           =   3
  82.       Left            =   2640
  83.       TabIndex        =   6
  84.       Top             =   2400
  85.       Width           =   2415
  86.       _ExtentX        =   4260
  87.       _ExtentY        =   3836
  88.       Begin VB.PictureBox picMarble 
  89.          AutoSize        =   -1  'True
  90.          Height          =   6105
  91.          Index           =   3
  92.          Left            =   240
  93.          Picture         =   "TestSwin.frx":1706A6
  94.          ScaleHeight     =   6045
  95.          ScaleWidth      =   6225
  96.          TabIndex        =   7
  97.          Top             =   240
  98.          Width           =   6285
  99.       End
  100.    End
  101. End
  102. Attribute VB_Name = "frmTestSwin"
  103. Attribute VB_GlobalNameSpace = False
  104. Attribute VB_Creatable = False
  105. Attribute VB_PredeclaredId = True
  106. Attribute VB_Exposed = False
  107. Option Explicit
  108.  
  109. ' Move the picture into the upper left corner.
  110. ' It's not there at design time to make it easier
  111. ' to see the ScrolledWindow control.
  112. Private Sub Form_Load()
  113. Dim i As Integer
  114.  
  115.     For i = 0 To 3
  116.         picMarble(i).Move 0, 0
  117.         picMarble(i).BorderStyle = vbBSNone
  118.     Next i
  119. End Sub
  120.  
  121. Private Sub Form_Resize()
  122.     swinMarble(0).Move 0, 0, ScaleWidth / 2, ScaleHeight / 2
  123.     swinMarble(1).Move ScaleWidth / 2, 0, ScaleWidth / 2, ScaleHeight / 2
  124.     swinMarble(2).Move 0, ScaleHeight / 2, ScaleWidth / 2, ScaleHeight / 2
  125.     swinMarble(3).Move ScaleWidth / 2, ScaleHeight / 2, ScaleWidth / 2, ScaleHeight / 2
  126. End Sub
  127.